package com.gis.bigdata.spark02.core.framework.common

import com.gis.bigdata.spark02.core.framework.util.EnvUtil
import org.apache.spark.SparkContext
import org.apache.spark.rdd.RDD

/**
 * @author LnnuUser
 * @create 2022-10-07-下午10:04
 */
trait TDao {

  def readFile(path: String): RDD[String] = {
    // ThreadLocal可以对线程内的数据共享
    val sc: SparkContext = EnvUtil.take()
    sc.textFile(path)
  }
}
